    //渲染UI的父类
    class Render {
        constructor(width, height, bgColor, x, y) {
            this.width = width || 10;
            this.height = height || document.documentElement.clientHeight / document.documentElement.clientWidth * 10;
            this.bgColor = bgColor || '';
            this.x = x || 0;
            this.y = y || 0;
            this.rendered = null;
        }
        render = function() { //将对象渲染到页面上的方法
            this.remove();
            let objDiv = document.createElement('div');
            objDiv.style.position = 'absolute';
            objDiv.style.left = this.x * this.width + 'rem';
            objDiv.style.top = this.y * this.height + 'rem';
            objDiv.style.width = this.width + 'rem';
            objDiv.style.height = this.height + 'rem';
            objDiv.style.background = this.bgColor;
            objDiv.style.zIndex = '100';
            document.body.appendChild(objDiv);
            this.rendered = objDiv;
            window.addEventListener('resize', this.render.bind(this));
            return objDiv;
        }
        remove = function() { //将对象从页面渲染中移除
            if (this.rendered) {
                document.body.removeChild(this.rendered);
                this.rendered = null;
                return 1;
            }
            return 0;
        }
    }